#ifndef OBSERVER_H
#define OBSERVER_H
#include<memory>
#include"subject.h"
using namespace std;
class Observer
{
protected:
    shared_ptr<Subject> m_sub;
public:
    Observer(shared_ptr<Subject> sub = nullptr) : m_sub(sub)
    {}
    virtual void update() = 0;
};
#endif